package com.es.hr.baoxiao;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import com.es.business.area.AreaBean;
import com.es.business.area.AreaBiz;
import com.es.business.city.CityBean;
import com.es.business.city.CityBiz;
import com.es.business.citys.CitysBean;
import com.es.business.citys.CitysBiz;
import com.es.business.province.ProvinceBean;
import com.es.business.province.ProvinceBiz;
import com.es.common.CommonBean;
import com.es.common.CommonBiz;
import com.es.hr.baoxiao.BaoxiaoBean;
import com.es.hr.baoxiao.BaoxiaoBiz;
import com.es.hr.emp.EmpInfoBean;
import com.es.main.LoginUserBeen;
import com.es.util.page.PageBean;
import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class SetBaoxiaoPropertyDoAction extends ActionSupport
implements ServletRequestAware{
	 HttpServletRequest request;

	public void setServletRequest(HttpServletRequest paramHttpServletRequest) {
		// TODO Auto-generated method stub
		this.request = paramHttpServletRequest;
	}
	
	public String execute() throws Exception{
		String result = "";
		String message = "";
		
		LoginUserBeen userLogin = (LoginUserBeen)request.getSession().getAttribute("loginuser");

				String baoxiao_day = this.request.getParameter("baoxiao_day");
				String shenpi_day = this.request.getParameter("shenpi_day");
				String chailv_yuzhi = this.request.getParameter("chailv_yuzhi").trim();
				if(chailv_yuzhi.length() < 1) chailv_yuzhi = "0";
				
				String shenqing_id = this.request.getParameter("shenqing_id");
				String shenpi_id = this.request.getParameter("shenpi_id");
				String chailv_yuzhi_id = this.request.getParameter("chailv_yuzhi_id");
				
				
				new CommonBiz().modifyCommon("baoxiaoshenqingriqi", baoxiao_day, shenqing_id);
				new CommonBiz().modifyCommon("baoxiaoshenpiriqi", shenpi_day, shenpi_id);
				new CommonBiz().modifyCommon("chailvyuzhi", chailv_yuzhi.trim(), chailv_yuzhi_id);
				 message = "设置成功！";
					this.request.setAttribute("message", message);
				result = "success";
				return result;
			}
}
